import layoutHeaderAside from '@/layout/header-aside'

const meta = { auth: true }

export default {
  path: '/system',
  name: 'system',
  meta,
  redirect: { name: 'system-index' },
  component: layoutHeaderAside,
  children: (pre => [
    {
      path: 'index',
      name: `${pre}index`,
      component: () => import('@/pages/system/index'),
      meta: {
        ...meta,
        title: '菜单管理'
      }
    },
    {
      path: 'role',
      name: `${pre}system-role`,
      component: () => import('@/pages/system/role'),
      meta: {
        ...meta,
        title: '角色管理'
      }
    },
    {
      path: 'user',
      name: `${pre}system-user`,
      component: () => import('@/pages/system/user'),
      meta: {
        ...meta,
        title: '成员管理'
      }
    }
  ])('system-')
}
